<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>配货单</title>
</head>

<body>
<div id="print_content" style="display:none;">
	<style type="text/css">
	  body{font-size:14px;}
	  tr td {height:20px;}
	</style>
	<div style="margin:0px auto;width:100%">
	<table border="0" cellpadding="3" cellspacing="0" style="width:100%">
	  <tr>
	    <td style="width:65px">订单号：</td>
	    <td colspan="2">{$order.order_id}</td>
	    <td style="width:65px">客户：</td>
	    <td colspan="2">&nbsp;</td>
	  </tr>
	  <tr>
	    <td>日期：</td>
	    <td colspan="2">{$order.confirm_time|date='Y-m-d H:i:s',###}</td>
	    <td>电话：</td>
	    <td colspan="2">{$order.tel}</td>
	  </tr>
	  <tr>
	    <td colspan="6"><hr style="border:1px double #333; height:1px; border-left:0px; border-right:0px;"/></td>
	  </tr>
	  <tr style="font-weight:bold;">
	    <td>NO</td>
	    <td>商品名称</td>
	    <td>规格</td>
	    <td>单价</td>
	    <td>数量</td>
	    <td>配货状态</td>
	  </tr>
	  <tbody>
	    <volist id="vo" name="order['orderItems']">
	    	<volist id="vo_item" name="vo['items']" key="index">
	    	    <tr>
	    	    	<if condition="$index eq 1">
				    <td rowspan="{:count($vo['items'])}">{$vo['productId']}</td>
				    <td rowspan="{:count($vo['items'])}">{$vo['productName']}</td>
				    </if>
				    <td>{$vo_item['productAttr']}</td>
				    <td>{$vo_item['productPrice']}</td>
				    <td>{$vo_item['productNumber']}</td>
				    <td>□</td>
			    </tr>
			 </volist>
	    </volist>
	  </tbody>
	  <tr>
	    <td colspan="6"><hr style="border:1px dashed #888; height:1px; border-left:0px; border-right:0px; border-bottom:0px;"/></td>
	  </tr>
	  </table>
	</div>
</div>
<iframe id="print_frame" style="width:100%;border:0px;"></iframe>
<div id="operate" style="text-align:center;">
	<input id="btnPrint" type="button" value="打印" onclick="javascript:print_sheet();"/>
</div>
<script>
window.onload = function() {
	var print_frame = document.getElementById('print_frame');
	print_frame.contentDocument.body.innerHTML = document.getElementById('print_content').innerHTML;
	print_frame.style.height = print_frame.contentDocument.body.clientHeight+"px";
}
function print_sheet() {
	document.getElementById('print_frame').contentWindow.print();
}
</script>
</body>
</html>
